import 'package:get/get.dart';
import 'package:grab_the_order/app/data/services/log_service.dart';

class LogController extends GetxController {
  final logService = Get.find<LogService>();

  void clearAllLogs() {
    Get.defaultDialog(
      title: "确认",
      middleText: "确定要清空所有日志记录吗？",
      textConfirm: "清空",
      textCancel: "取消",
      onConfirm: () {
        logService.clearLogs();
        Get.back();
      }
    );
  }
}